let state = {
	list: [
	    {
	        id: 0,
	        tel: "13024567890",
	        address: "福建省泉州市丰泽区东海泰禾广场13栋",
			details: '1702室',
			name: '小鱼儿'
	    },
	    {
	        id: 1,
	        tel: "13066666666",
	        address: "福建省厦门市思明区万寿路",
			details: '11号',
			name: '花无缺'
	    },
	],
	info: {
		address: '',
		details: '',
		name: '',
		tel: ''
	},
	data: {
		show: false,
		area: [],
		count: 0,
		selectAddress: ['请选择'],
		selectIndex: [],
		nameList: [],
	}
};

let getters = {};

let mutations = {
	set_list(state, payload) {
		state.list.push(payload)
		// console.log(state.list)
	},
	set_info(state, payload) {
		for(let key in payload) {
			state.info[key] = payload[key]
		}
	},
	set_data(state, payload) {
		for(let key in payload) {
			state.data[key] = payload[key]
		}
	}
};

let actions = {
	get_list({commit}, payload) {
		commit('set_list', payload)
	},
	get_info({commit}, payload) {
		commit('set_info',payload)
	},
	get_data({commit}, payload) {
		commit('set_data',payload)
	}
};

export default {
	namespaced: true,
	state,
	getters,
	mutations,
	actions
}